package com.syh.jn.scm.infrastructure.repository.model.finance;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 单位应收付记录汇总表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "T_FINANCE_BUSINESS_ACCOUNT_SUMMARY")
@EqualsAndHashCode(callSuper = true)
public class BusinessAccountSummaryModel extends SuperBusinessModel {
  /**
   * 客户id
   */
  @Column(name = "CUSTOMER_ID", columnDefinition = "bigint COMMENT '客户id'")
  private Long customerId;
  /**
   * 客户类型: 0上游, 1下游, 2物流
   */
  @Column(name = "CUSTOMER_TYPE", columnDefinition = "smallint COMMENT '客户类型: 0上游, 1下游, 2物流'")
  private Short customerType;
  /**
   * 应收金额
   */
  @Column(name = "RECEIVE_TOTAL_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '应收金额'")
  private BigDecimal receiveTotalAmount;
  /**
   * 应付金额
   */
  @Column(name = "PAYMENT_TOTAL_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '应付金额'")
  private BigDecimal paymentTotalAmount;
  /**
   * 已收金额
   */
  @Column(name = "RECEIVE_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '已收金额'")
  private BigDecimal receiveAmount;
  /**
   * 已付金额
   */
  @Column(name = "PAYMENT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '已付金额'")
  private BigDecimal paymentAmount;

}
